package model

type Author struct {
	ID        int64  `json:"id" form:"id" gorm:"column:id"`
	Name      string `json:"name" form:"name" gorm:"column:name;type:varchar(60);NOT NULL;comment:'姓名'"`
	WriteName string `json:"writeName" form:"writeName" gorm:"column:write_name;type:varchar(60);NOT NULL;comment:'笔名'"`
	Age       int    `json:"age" form:"age" gorm:"column:age;type:int(11);NOT NULL;comment:'年龄'"`
	Gender    int8   `json:"gender" form:"gender" gorm:"column:gender;type:tinyint(4);NOT NULL;comment:'性别0-男1-女'"`
	Phone     string `json:"phone" form:"phone" gorm:"column:phone;type:varchar(20);NOT NULL;comment:'手机号'"`
	Deleted   int8   `json:"deleted" form:"deleted" gorm:"column:deleted;type:tinyint(4);NOT NULL;default:0;comment:'状态0-正常1-删除'"`
}

func (Author) TableName() string {
	return "author_gorm"
}
